import request from '@/utils/request'


export function add(id, name, bgColor, showStatus, position, orderBy, bgImage) {
    return request({
        url: '/api/navigate/add.do',
        method: 'get',
        params: {
            id, name, bgColor, showStatus, position, orderBy, bgImage
        }
    })
}

export function navigateList() {
    return request({
        url: '/api/navigate/list.do',
        method: 'get'
    })
}

export function del(id) {
    return request({
        url: '/api/navigate/delete.do',
        method: 'get',
        params: { id }
    })
}

export function changeStatus(id) {
    return request({
        url: '/api/navigate/updateStatus.do',
        method: 'get',
        params: { id }
    })
}

export function addProductToNavigate(id, productIdsStr) {
    return request({
        url: '/api/navigate/addProductToNavigate.do',
        method: 'get',
        params: { id, productIdsStr }
    })
}

export function productList(id) {
    return request({
        url: '/api/navigate/productList.do',
        method: 'get',
        params: { id }
    })
}

export function removeProduct(id) {
    return request({
        url: '/api/navigate/removeProduct.do',
        method: 'get',
        params: { id }
    })
}



export function searchProduct(index, pageSize, id, productId, name) {
    return request({
        url: '/api/navigate/searchProduct.do',
        method: 'get',
        params: {
            index, pageSize, id, productId, name
        }
    })
}